package com.example.zz.example.pattern.facade;

/**
 * Describe:
 *
 * @author zhangzhuo18.
 * Date: 2024/6/3
 */
public class Mobile {
    private Camera camera = new CameraImpl();
    private Phone phone = new PhoneImpl();

    /**
     * 开启视频通话
     */
    public void videoChat() {
        camera.open();
        phone.call();
    }

    /**
     * 结束视频通话
     */
    public void videoChatClose() {
        camera.close();
        phone.hangup();
    }

    /**
     * 打电话
     */
    public void call() {
        phone.call();
    }

    /**
     * 挂断电话
     */
    public void endCall() {
        phone.hangup();
    }

    /**
     * 照相
     */
    public void takePicture() {
        camera.takePicture();
    }

}
